﻿using Autofac;
using CSharpLogger.Common;
using CSharpLogger.Fake;

namespace CSharpLogger.UnitTest
{
    public class ContainerBuilderFactoryConfiguration
    {
        public static void Configure()
        {
            var builder = ContainerBuilderFactory.ContainerBuilder;

            builder.RegisterType<FileWrapperFake>().As<IFileWrapper>().SingleInstance();

            if(ContainerBuilderFactory.Container == null)
                ContainerBuilderFactory.Container = builder.Build();                        
        }
    }
}
